package com.sofaguest.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sofaguest.entry.SofaResult;
import com.sofaguest.service.TravelService;

@Controller
@RequestMapping("/travel")
public class TravelController {

    @Resource
    private TravelService travel;

    @ResponseBody
    @RequestMapping("/qryTravelList.do")
    public SofaResult qryTravelList(int page, String byTime) {
        return travel.qryTravelList(page, byTime);
    }

    @ResponseBody
    @RequestMapping("/createTravel.do")
    public SofaResult createTravel(String author, String tatile, String tourType, String content) {
        return travel.createTravel(author, tatile, tourType, content);
    }

    @ResponseBody
    @RequestMapping("/travelDetail.do")
    public SofaResult travelDetail(String noteId) {
        return travel.travelDetail(noteId);
    }

    @ResponseBody
    @RequestMapping("/getMassageList.do")
    public SofaResult getMassageList(int byTimeTag) {
        return travel.getMassageList(byTimeTag);
    }

    @ResponseBody
    @RequestMapping("/getTravelList.do")
    public SofaResult getTravelList(int byTimeTag) {
        return travel.getTravelList(byTimeTag);
    }
}
